package com.asset.service;

import com.asset.model.dto.approval.BudgetApproveRequest;
import com.asset.model.dto.approval.budget.BudgetAssetQuerRequest;
import com.asset.model.dto.approval.budget.BudgetQuerRequest;
import com.asset.model.dto.approval.budget.BudgetUpdateRequest;
import com.asset.model.entity.BudgetApplication;
import com.asset.model.entity.BudgetApplicationDetail;
import com.asset.model.entity.CascadeAssetCategory;
import com.asset.model.entity.User;
import com.asset.model.vo.LoginUserVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface BudgetService {

    /**
     * 分页获取预算申请列表
     */
    List<BudgetApplication> getBudgetApplicationList(BudgetQuerRequest budgetQuerRequest);

    /**
     * 新增预算申请
     */
    boolean addBudgetApplication(BudgetApplication budgetApplication, LoginUserVO user);

    /**
     * 根据 id 获取预算申请记录
     */
    BudgetApplication getBudgetApplicationById(Integer budgetId);

    /**
     * 更新预算申请
     */
    boolean updateBudget(BudgetApplication budgetApplication);

    /**
     * 更新预算申请（重载
     */
    boolean updateBudget(BudgetUpdateRequest budgetUpdateRequest);

    /**
     * 获取级联的资产分类列表
     */
    List<CascadeAssetCategory> getCascadeAssetCategoryList();

    /**
     * 添加一条预算申请详情
     */
    boolean addBudgetApplicationDetail(BudgetApplicationDetail budgetApplicationDetail);

    /**
     * 获取预算申请详情列表
     */
    List<BudgetApplicationDetail> getBudgetDetailQueryWrapper(BudgetAssetQuerRequest budgetAssetQuerRequest);

    /**
     * 领导审批预算
     */
    boolean approveBudgetByLeader(BudgetApproveRequest budgetApproveRequest, LoginUserVO loginUser);

    /**
     * 删除预算资产
     */
    boolean delBudgetApplicationDetail(Integer id);

    /**
     * 删除预算申请
     */
    boolean delBudgetApplication(Integer budgetApplicationId, Integer userId);
}
